package com.my_orm.core;

import java.util.Arrays;
import java.util.List;

/**
 * @Author 1210357826@qq.com
 * @Desc 每一个方法里面详细信息
 **/
public class MethodDetails {
    /**方法返回类型,若是集合，则代表集合的对象类，目前集合类仅支持返回List */
    private Class<?> returnType;

    /**方法返回类型是否是集合*/
    private boolean HasSet;

    /**执行类型，SELECT,UPDATE,DELETE,INSERT*/
    private Integer executeType;

    /**方法输入参数类型集合*/
    private Class<?>[] parameterTypes;

    /**方法输入参数名集合*/
    private List<String> parameterNames;

    /**sql语句集合*/
    private SqlSource sqlSource;

    public Class<?> getReturnType() {
        return returnType;
    }

    public void setReturnType(Class<?> returnType) {
        this.returnType = returnType;
    }

    public boolean isHasSet() {
        return HasSet;
    }

    public void setHasSet(boolean hasSet) {
        HasSet = hasSet;
    }

    public Integer getExecuteType() {
        return executeType;
    }

    public void setExecuteType(Integer executeType) {
        this.executeType = executeType;
    }

    public Class<?>[] getParameterTypes() {
        return parameterTypes;
    }

    public void setParameterTypes(Class<?>[] parameterTypes) {
        this.parameterTypes = parameterTypes;
    }

    public List<String> getParameterNames() {
        return parameterNames;
    }

    public void setParameterNames(List<String> parameterNames) {
        this.parameterNames = parameterNames;
    }

    public SqlSource getSqlSource() {
        return sqlSource;
    }

    public void setSqlSource(SqlSource sqlSource) {
        this.sqlSource = sqlSource;
    }

    @Override
    public String toString() {
        return "MethodDetails{" +
                "returnType=" + returnType +
                ", HasSet=" + HasSet +
                ", executeType=" + executeType +
                ", parameterTypes=" + Arrays.toString(parameterTypes) +
                ", parameterNames=" + parameterNames +
                ", sqlSource=" + sqlSource +
                '}';
    }
}
